﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Flowers;

namespace Logic
{
    public class Factory
    {
        //букет состоит из цветов 
        public List<AbstractFlowers> CreateBouquet()
        {
            List<AbstractFlowers> Bouquet = new List<AbstractFlowers>();
            //создатели цветов в букете
            Creator[] Creators = new Creator[9];
            Creators[0] = new RoseCreator();
            Creators[1] = new RoseCreator();
            Creators[2] = new RoseCreator();
            Creators[3] = new CamomileCreator();
            Creators[4] = new CamomileCreator();
            Creators[5] = new CamomileCreator();
            Creators[6] = new TulipCreator();
            Creators[7] = new TulipCreator();
            Creators[8] = new TulipCreator();
            //добаляем цветы в букете
            foreach (Creator A in Creators)
            {
                Bouquet.Add(A.FactoryMethod());
            }
            return Bouquet;
        }
    }
}